{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}
{% import "_macros.html" as micros %}

{% block scripts %}
{{ super() }}
{{ pagedown.include_pagedown() }}
{% endblock %}

{% block page_content %}
<div class="page-header">
    <h1>Welcome,
        {% if current_user.is_authenticated %}
            {{ current_user.username }}
        {% else %}
            Stranger
        {% endif %}
    </h1>
    {% if not know %}
    <p>Pleased to meet you!</p>
    {% else %}
    <p>Happy to see you again!</p>
    {% endif %}
</div>

<div>
    {% if current_user.can(Permission.WRITE_ARTICLES) %}
        {{ wtf.quick_form(form) }}
    {% endif %}
</div>
<div class="post-tabs">
    <ul class="nav nav-tabs">
        <li {% if not show_followed %}class="active"{% endif %}><a href="{{ url_for('.show_all') }}">All</a></li>
        {% if current_user.is_authenticated %}
            <li {% if show_followed %}class="active"{% endif %}><a href="{{ url_for('.show_followed') }}">Followers</a></li>
        {% endif %}
    </ul>
    {% include '_posts.html' %}
</div>
{% if pagination %}
<div class="pagination">
    {{ micros.pagination_widge(pagination, '.form_validate') }}
</div>
{% endif %}
{% endblock %}